Repository navigation
fix(fold): report the panel the verified pose lights, not the pre-fold one - #5012
Conversation
…d one The guest switches panel power after the hinge stop, so the single lit-panel read after an iPhone Duo fold often named the panel lit before the fold. Poll the lit panel for up to 5 seconds until it is the panel the verified pose lights (primary when closed, the other panel otherwise), and omit screen when it never is. A pose that already lit its panel still settles on one read.
Panels were measured only at the closed, half-open and open poses, so a custom keyframe angle keeps one panel read. An unresolved panel table or one without measured panel power ends the panel reads at once, and the time left on the deadline bounds each read, so the wait costs about one full read. The timeout ledger now measures a named pose whose panel never switches, and ADR 0025 records the exception to its rejected pose-to-panel map.
|
Thanks for the fix. The change at 157d15e looks ready, and no conflicts are known. CI is still running: Integration Tests, Coverage and the Smoke Tests had not finished, and Body rules was cancelled, so those need to finish green and Body rules needs a re-run before merge. Not blocking, and fine to take or leave: the ADR and config comment say each read ends by the deadline, but pose.ts uses a 500ms floor, so a late read can run slightly past it; the fold doc asks for all three poses in both device sets, while the PR body shows open and closed only, so one half-open run and one scoped-set run would help; and the ledger test bounds one maximal read, not the multi-read poll, which a test comment could say. Not verified here: the live simulator runs and the 129s/255s figures, which come from the PR body, and the stale-first-read route, which only the mocked unit test covers. |
Summary
On the iPhone Duo,
foldread the lit panel once, right after the hinge stopped. The guest can switch panel power later, soscreencould name the panel lit before the fold.After a named pose,
foldnow rereads the panel table for a few seconds until the pose's panel is lit (primarywhen closed, the other panel otherwise). If it never is,screenis left out. The reads stop at once when the table is unresolved or reports no measured power. Custom keyframe angles keep a single read. Poll reads are bounded by the deadline, so the wait costs about one read. Help and ADR 0025 are updated.Before / after
iPhone Duo simulator (iOS 27.2), with
fold open/fold closedeach followed byscreenshot:The stale read happened under host load and didn't reproduce on an idle Mac. It is covered by
pose.test.ts: on a stale first read, base reportsLCD 466x678, head reportsLCD-1 669x951.Validation
157d15ebb,check:affected --run --head,exactCommit: true. Every gate passes exceptunit, whereupload-http-deadlineandcommitted-source-treefail the same way on clean main on this macOS host.adr-citations2/2.fold openafter a cold boot sometimes fails withfold-pose-dispatched-unverifiedon both base (1/4) and head (2/3). The helper waits only 3 s for the first hinge sample.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.